package org.flexthinker.binding.validation.support
{
    import org.flexthinker.binding.validation.ValidationListener;
    import org.flexthinker.binding.validation.ValidationResults;

    /**
     * Used for unit tests.
     * Counts every call to the <code>validationResultsChanged</code>.
     */
    public class ValidationListenerCounter implements ValidationListener
    {
        public var counter:int = 0;

        public var currentResults:ValidationResults;

        public function ValidationListenerCounter()
        {
        }


        public function validationResultsChanged( results:ValidationResults ):void
        {
            this.currentResults = results;
            counter ++;
        }
    }
}